package cn.cycleif.app.controller;

import cn.cycleif.app.domain.dto.ReportDTO;
import cn.cycleif.app.service.ReportService;
import cn.cycleif.util.R;
import cn.dev33.satoken.annotation.SaCheckLogin;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Date: 25/2/11-15:21
 * @Desc:
 */
@RequestMapping("/api/report")
@Tag(name = "举报管理")
@RestController
@SaCheckLogin
public class ReportController {

  @Autowired
  private ReportService reportService;

  @PostMapping()
  @Operation(summary = "举报")
  public R<String> report(@RequestBody ReportDTO reportDTO) {
    return reportService.report(reportDTO);
  }
}
